<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>广告</title>
	<style type="text/css">
		#ad{
			overflow: hidden;
		}
	</style>
</head>
<body>
	<div id="ad"><img src="../pic/1.jpg"  ></div>
</body>
<script type="text/javascript">
	window.onload =function(){
		var ad = document.getElementById('ad');
		ad.style.display='block';
		animate('ad',1,500,6);
		window.setTimeout('animate("ad",500,70,-6)',4000);}
		function animate(tagid,min,max,step){
			var obj = document.getElementById(tagid);
			var i = 0;
			var handler = window.setInterval(function(){
			var h = min +i++*step;
			obj.style.height = h +'px';
			if(h>=max&&step>0||h<=max&&step<0){
				window.clearInterval(handler);
			}
		}
			,50);
		}
	
	
</script>
</html>